added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / VBSL4WCFNetTcp / NetTcpWCFService / Module1.vb
blobe54a1e95a958b24d9671cca3d58f42e9b2c6be88
1 '****************************** Module Header ******************************'
2 ' Module Name: Module1.vb
3 ' Project: NetTcpWCFService
4 ' Copyright (c) Microsoft Corporation.
5 '
6 ' NetTcpWCFService application's entrance, creating a serviceHost
7 ' to host WCF service.
8 '
9 ' This source is subject to the Microsoft Public License.
10 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 ' All other rights reserved.
13 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
14 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
15 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16 '***************************************************************************'
18 Imports System.ServiceModel
20 Module Module1
22 Sub Main()
23 Using host = New ServiceHost(GetType(WeatherService))
24 host.Open()
25 Console.WriteLine("Service is running...")
26 Console.WriteLine("Service address: " + host.BaseAddresses(0).AbsoluteUri)
27 Console.Read()
28 End Using
29 End Sub
31 End Module